﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using RPGSoundmixerGUI.Properties;

namespace RPGSoundmixerGUI.Text {
    /// <summary>
    /// Vergibt die Texte für das GUI
    /// </summary>
    public class TextDispenser {
        internal static string GetText(int index) {
            Settings s = new Settings(); 
            XElement text = XElement.Load(s.LanguageFile);
            IEnumerable<string> message = from t in text.Elements()
                             where t.Attribute("id").Value.Equals(index.ToString())
                             select t.Value;
            return message.First(); 
        }
        
    }
}
